package com.qkbb.admin.kuibu.qkbb.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ImageView;

import com.qkbb.admin.kuibu.R;


public class logo extends Activity {
    private ImageView imageView;
    private Handler handler;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_logo);
        getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
        imageView= (ImageView) findViewById(R.id.logo_imageview);
        imageView.setImageResource(R.mipmap.qidong_1);
        handler=new Handler(){
            @Override
            public void handleMessage(Message msg) {
                super.handleMessage(msg);
                if (msg.what==1){
                    Intent intent=new Intent(logo.this,Theme.class);
                    startActivity(intent);
                    finish();
                }
            }
        };
        new Thread(new Runnable() {
            @Override
            public void run() {
                try {
                    Thread.sleep(2000);
                    Message message=new Message();
                    message.what=1;
                    handler.sendMessage(message);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        }).start();
//        viewPager= (ViewPager) findViewById(R.id.first_viewpager);
//        ImageView imageView=new ImageView(getApplicationContext());
//        imageView.setImageResource(R.mipmap.qidong_1);
//        ImageView imageView1=new ImageView(getApplicationContext());
//        imageView1.setImageResource(R.mipmap.qidong_2);
//        ImageView imageView2=new ImageView(getApplicationContext());
//        imageView2.setImageResource(R.mipmap.qidong_3);
//        ImageView imageView3[]=new ImageView[]{imageView};
//        FristPagerAdaPter adaPter=new FristPagerAdaPter(imageView3);
//        viewPager.setAdapter(adaPter);setAdapter


    }
}
